<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>隔行变色</title>
    <style>
        *{
            padding:0;
            margin:0;
        }

        ul{
            list-style: none;
        }

        .news-list{
            width: 280px;
            margin: 100px auto;
            background-color: orange;
            border-radius: 5px;
            padding: 10px;
        }

        .news-list li{
            line-height:30px;
            cursor: pointer;
            padding-left:10px;
        }
        .news-list span{
            margin-right: 10px;
        }
    </style>

    <script>
        window.onload = function () {
            var lis = this.document.getElementsByTagName("li");
            for (var i = 0; i < lis.length; i++) {
                var obj = lis[i];
                obj.onmouseover = function () {
                    this.style.backgroundColor = "#ffffff";
                }

                obj.onmouseout = function () {
                    this.style.backgroundColor = "orange";
                }
            }
        }
    </script>
</head>
<body>
<div class="news-list">
    <ul>
        <li><span>这是新闻的标题</span><span>11-23</span><span>15115</span><span>54%</span></li>
        <li><span>这是新闻的标题</span><span>11-23</span><span>15115</span><span>54%</span></li>
        <li><span>这是新闻的标题</span><span>11-23</span><span>15115</span><span>54%</span></li>
        <li><span>这是新闻的标题</span><span>11-23</span><span>15115</span><span>54%</span></li>
        <li><span>这是新闻的标题</span><span>11-23</span><span>15115</span><span>54%</span></li>
        <li><span>这是新闻的标题</span><span>11-23</span><span>15115</span><span>54%</span></li>
        <li><span>这是新闻的标题</span><span>11-23</span><span>15115</span><span>54%</span></li>
        <li><span>这是新闻的标题</span><span>11-23</span><span>15115</span><span>54%</span></li>
        <li><span>这是新闻的标题</span><span>11-23</span><span>15115</span><span>54%</span></li>
        <li><span>这是新闻的标题</span><span>11-23</span><span>15115</span><span>54%</span></li>
    </ul>
</div>
</body>
</html>